import { DescItem } from "/@/components/Description";
import { defaultDescRender } from "/@/hooks/core/useDefault";
import { FormProps, FormSchema } from "/@/components/Table";
import { getSelectListApi } from "/@/api/core/group";
import { IntershipTypeEnum } from "/@/enums/typeEnum";

export const searchFormConfig: FormProps = {
  colon: true,
  labelWidth: 80,
  schemas: [
    {
      field: "groupId",
      label: "小组名称",
      component: "ApiSelect",
      required: true,
      colProps: {
        span: 12,
      },
      componentProps: {
        api: getSelectListApi,
        labelField: "groupName",
        valueField: "groupId",
      },
    },
  ],
};

export const reportDescSchema: DescItem[] = [
  {
    field: "schLectureNote",
    label: "听课记录中学指导教师评分",
    contentMinWidth: 40,
  },
  {
    field: "univLectureNote",
    label: "听课记录高校指导教师评分",
    contentMinWidth: 40,
  },
  {
    field: "schLessonPlan",
    label: "教案设计中学指导教师评分",
  },
  {
    field: "univLessonPlan",
    label: "教案设计高校指导教师评分",
  },
  {
    field: "schTeachingStudy",
    label: "教研活动中学指导教师评分",
  },
  {
    field: "univTeachingStudy",
    label: "教研活动高校指导教师评分",
  },
  {
    field: "schTeacherMoral",
    label: "师德表现中学指导教师评分",
  },
  {
    field: "univTeacherMoral",
    label: "师德表现高校指导教师评分",
  },
  {
    field: "schLeaderWork",
    label: "班主任实习工作中学指导教师评分",
  },
  {
    field: "univLeaderWork",
    label: "班主任实习工作高校指导教师评分",
  },
  {
    field: "schClassroomTeaching",
    label: "课堂教学中学指导教师评分",
  },
  {
    field: "univClassroomTeaching",
    label: "课堂教学高校指导教师评分",
  },
  {
    field: "groupScore",
    label: "教育实习学生小组互评分数",
  },
  {
    field: "total",
    label: "教育实习学生综合分数",
  },
];

export const remarkFormSchema: FormSchema[] = [
  {
    field: "content",
    label: "评语",
    component: "InputTextArea",
    required: true,
    componentProps: {
      rows: 5,
    },
  },
];

export const internshipDescSchema: DescItem[] = [
  {
    field: "type",
    label: "实习类型",
    contentMinWidth: 300,
    render: (value) => (value === IntershipTypeEnum.Collective ? "集体实习" : "个人实习"),
  },
  {
    field: "subject",
    label: "实习学科",
    render: defaultDescRender,
  },
  {
    field: "schoolName",
    label: "实习基地",
    render: defaultDescRender,
  },
  {
    field: "teacherName",
    label: "实习导师姓名",
    render: defaultDescRender,
  },
  {
    field: "grade",
    label: "实习年级",
    render: defaultDescRender,
  },
  {
    field: "startDate",
    label: "实习开始时间",
    render: defaultDescRender,
  },
];

export const leaderWorkDescSchema: DescItem[] = [
  {
    field: "className",
    label: "实习班级",
    labelMinWidth: 100,
    contentMinWidth: 200,
  },
  {
    field: "studentAmount",
    label: "班级学生人数",
    labelMinWidth: 100,
    contentMinWidth: 200,
  },
  {
    field: "baseInfo",
    label: "基本情况",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
  {
    field: "dailyWork",
    label: "日常工作",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
  {
    field: "workPlan",
    label: "班主任工作计划",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
  {
    field: "educationPlan",
    label: "班级综合育人课外活动设计实施方案",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
  {
    field: "classActivity",
    label: "独立开展班级活动记录",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
  {
    field: "groupEvaluation",
    label: "小组评价",
    labelMinWidth: 100,
    contentMinWidth: 200,
    span: 2,
  },
];
